package com.zhengjiang.api.demo.controller;
import com.zhengjiang.api.demo.annotation.NotRepeatSubmit;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/biz")
public class ApiController {

    @PostMapping("/hello")
    public String hello(String name){
        return String.format("hello %s !",name);
    }

    @PostMapping("/repeat")
    @NotRepeatSubmit(value = 5 * 60 * 1000L)
    public String repeat(String name){
        return "repeat!" ;
    }
}
